Repository navigation
Conversation
This was referenced Oct 29, 2026
Rigidity
force-pushed
the
rigidity/vault-sync
branch
2 times, most recently
from
October 30, 2026 02:31
1584788 to
d4147ab
Compare
Rigidity
force-pushed
the
rigidity/vault-sync
branch
3 times, most recently
from
November 9, 2026 03:02
f565878 to
1c3e91b
Compare
Rigidity
force-pushed
the
rigidity/vault-sync
branch
from
November 9, 2026 03:17
1c3e91b to
4e80808
Compare
Rigidity
marked this pull request as ready for review
November 9, 2026 07:04
Rigidity
force-pushed
the
rigidity/vault-sync
branch
from
November 15, 2026 00:03
4e80808 to
cb739cf
Compare
Collaborator
Author
ScreenshotsTaken in
The full end-to-end run of every import method is in the comment on #969. |
Rigidity
force-pushed
the
rigidity/vault-sync
branch
from
November 15, 2026 01:10
cb739cf to
3956937
Compare
- Only count a coin locked to fixed conditions or a vault as ours once its puzzle hash is rebuilt from the vault address in its memos, so a stranger's transaction can't be taken for ours, and kept pending, because its memos name one of our vault addresses. - Share the test harness's sync setup with restart_sync, which left out the mempool source. - Test pre-split coins with the Legacy puzzle version, and with memos naming a later address. - Test that a launcher memo for another config doesn't set the eve coin's custody or config.
Its memos name a vault address, but anyone can write them and the lock isn't checked when a transaction is summarized, so a dApp's spend could show a payment to its own puzzle hash as one to the user's vault. Also test the CAT branch of the relevance check.
Rigidity
force-pushed
the
rigidity/vault-sync
branch
from
November 15, 2026 06:00
3956937 to
50d4e94
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Closes #949. Part of #945. Stacked on #967.
Follows tracked vaults on chain: their singleton lineage, custody and recovery state, and the coins and assets at their P2 singleton addresses. Nothing tracks a vault yet outside of tests; importing one comes in #969.
Following a vault
ChildKind::Vaultparses a vault coin from its parent. The SDK has noVault::parse, so it runs the parent singleton's inner puzzle, which must be a top-level MIPS tree, and takes the oddCREATE_COINas the next coin and custody hash. An eve coin's custody hash comes from the memo in its launcher's solution, and is only trusted if it rebuilds the coin's puzzle hash. Without a memo, it stays unknown until the eve coin is spent and reveals its inner puzzle.Configs and state
SyncEvent::VaultStateChanged { launcher_id, state }is sent when a vault's state changes, for Recover, cancel, and rekey vaults #954's alerts. The app maps it to a coin state refresh for now.Addresses
P2ConditionsOrSingleton), such as Cloud Wallet's offer pre-split coins, are recognized from their(vault_address, (conditions, ...))memos, for XCH and CATs. They're only kept if the address in the memos is one of our vault addresses, and the coin's p2 puzzle hash can be rebuilt from that vault and the conditions. Both puzzle versions are tried, with the address's nonce and nonce 0, as Cloud Wallet uses. Anyone can write these memos, so a CAT's lock is checked before it can add or change anything about its asset.Transaction history
Transactions are grouped by block, so a vault spend and the coins it spends from its addresses already show up as one transaction.
Tests
Peer simulator tests in
sage_wallet::vault_syncspend real vaults with BLS keys:A database test covers deriving the state from the lineage, including a reorg and a melt.
Not included
Review-loop changes